package com.pzb.common.core.domain.entity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.List;

/**
 * 商品分类对象 tb_goods_class
 * 
 * @author pzb
 * @date 2021-09-22
 */
public class GdGoodsClass implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 分类父级ID */
    private Long parentId;

    /** 分类编号 */
    private String className;

    /** 分类图片预览路径 */
    private String previewPath;

    /** 分类等级 */
    private Integer level;

    List<GdGoodsClass> children;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setClassName(String className) 
    {
        this.className = className;
    }

    public String getClassName() 
    {
        return className;
    }

    public String getPreviewPath() {
        return previewPath;
    }

    public void setPreviewPath(String previewPath) {
        this.previewPath = previewPath;
    }

    public void setLevel(Integer level) 
    {
        this.level = level;
    }

    public Integer getLevel() 
    {
        return level;
    }

    public List<GdGoodsClass> getChildren() {
        return children;
    }

    public void setChildren(List<GdGoodsClass> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentId", getParentId())
            .append("className", getClassName())
            .append("level", getLevel())
            .toString();
    }
}
